#include <iostream>
using namespace std;

int main()
{
	long long n = 0;
	cin >> n;
	while (n != 1)
	{
		if (n % 2 == 1)
		{
			//printf ("%lld*3+1=%lld\n", n, n * 3 + 1);
			cout << n << "*3+1=" << n * 3 + 1 << endl;
			n = n * 3 + 1;
		}
		else
		{
			//printf ("%lld/2=%lld\n", n, n / 2);
			cout << n << "/2=" << n / 2 << endl;
			n = n / 2;
		}
	}
	cout << "End";
	return 0;
 } 
